package com.qpcy.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author cjl
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResponseResult {

    private Integer code;

    private String msg;

    private Object data;

    public static ResponseResult success(Object data) {
        return new ResponseResult(200, "操作成功", data);
    }

    public static ResponseResult success() {
        return new ResponseResult(200, "操作成功", null);
    }

    public static ResponseResult error(String message) {
        return new ResponseResult(500, message, null);
    }

}
